package com.example.checkctf.ProcessorThink;

import android.app.Activity;

import com.example.baselibrary.Bean.CheckResultBean;
import com.example.baselibrary.Bean.CheckTicketBean;
import com.example.baselibrary.Utils.LogUtil;
import com.example.baselibrary.Utils.ThreadManager;
import com.example.baselibrary.Utils.TimeUtil;
import com.example.checkctf.NetworkRequest.NetRequestManger;
import com.example.checkctf.R;

public class FaceCheck {

    private static FaceCheck instance;


    public static synchronized FaceCheck getInstance() {
        if (null == instance) {
            instance = new FaceCheck();
        }
        return instance;
    }

    public void FacePick(final CheckResultBean s, final String base64) {

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
//                NetRequestManger.getInstance().uploadFace(base64, (String) s.getData().getBarcodeNo(), (String) s.getData().getCertificateName(), null, TimeUtil.convertTime(TimeUtil.FORMAT_DAY_EN_ZYF, System.currentTimeMillis()));
//                LogUtil.v("图片请求发出去了");
                NetRequestManger.getInstance().uploadFace(base64, s.getData().getBarcodeNo(), (String) "FlyKing", null, TimeUtil.convertTime(TimeUtil.FORMAT_DAY_EN_ZYF, System.currentTimeMillis()));

            }
        };
        ThreadManager.getThreadPool().execute(runnable);
    }

    public void OneFaceCheck(final String base64) {

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
//                NetRequestManger.getInstance().uploadFace(base64, (String) s.getData().getBarcodeNo(), (String) s.getData().getCertificateName(), null, TimeUtil.convertTime(TimeUtil.FORMAT_DAY_EN_ZYF, System.currentTimeMillis()));
//                LogUtil.v("图片请求发出去了");
                NetRequestManger.getInstance().checkFace(base64,  TimeUtil.convertTime(TimeUtil.FORMAT_DAY_EN_ZYF, System.currentTimeMillis()));

            }
        };
        ThreadManager.getThreadPool().execute(runnable);
    }


}
